Declare Sub DragAcceptFiles Lib "Shell" (ByVal hWnd As Integer, ByVal Accept As Integer)
Declare Function PeekMessage Lib "User" (lpMsg As Msg, ByVal hWnd As Integer, ByVal wMsgFilterMin As Integer, ByVal wMsgFilterMax As Integer, ByVal wRemoveMsg As Integer) As Integer
Declare Function DragQueryFile Lib "Shell" (ByVal hdrop As Integer, ByVal indexFilenum As Integer, ByVal lpFileName As String, ByVal buffsize As Integer) As Integer
Declare Sub DragFinish Lib "Shell" (ByVal hWnd As Integer)
Sub CheckDragDrop (Handle As Integer)
Dim NewMessage As Msg
Dim Fname As String * 129
Dim X As Integer
Dim Counter As Integer
Dim Temp$
If PeekMessage(NewMessage, Handle, WM_DROPFILES, WM_DROPFILES, PM_NOREMOVE Or PM_NOYIELD) Then
'Get number of files dropped
X = DragQueryFile(NewMessage.wparam, True, Fname, 128)
For Counter = 0 To X - 1 ' for each file dropped
If DragQueryFile(NewMessage.wparam, Counter, Fname, 128) Then